package com.dongqi.myblog.po;

import com.baomidou.mybatisplus.annotation.*;

import java.util.Date;
import java.io.Serializable;
import java.util.List;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.apache.catalina.User;

/**
 * <p>
 * 
 * </p>
 *
 * @author dongqi
 * @since 2020-08-03
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="TBlog对象", description="")
public class TBlog implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "blog主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "博客标题")
    private String title;

    @ApiModelProperty(value = "内容")
    private String content;

    @ApiModelProperty(value = "blog首图")
    private String firstPicture;

    @ApiModelProperty(value = "blog所属类型")
    private Long typeId;

    @ApiModelProperty(value = "所属用户")
    private Long userId;

    @ApiModelProperty(value = "标记（转载、原创）")
    private String flag;

    @ApiModelProperty(value = "浏览次数")
    @TableField(fill = FieldFill.INSERT)
    private Integer views;

    @ApiModelProperty(value = "赞赏是否开启")
    private Boolean appreciation=false;

    @ApiModelProperty(value = "转载声明是否开启")
    private Boolean shareStatement=false;

    @ApiModelProperty(value = "评论是否开启")
    private Boolean commentabled=false;

    @ApiModelProperty(value = "是否推荐")
    private Boolean recommend=false;

    @ApiModelProperty(value = "是否发布")
    private Boolean published;

    @ApiModelProperty(value = "逻辑删除")
    @TableField(fill = FieldFill.INSERT)
    private Integer isDeleted;

    @ApiModelProperty(value = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    @ApiModelProperty(value = "修改时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

    @ApiModelProperty(value = "blog描述")
    private String description;

    @TableField(exist = false)
    private TUser user;
    @TableField(exist = false)
    private List<TComment> comments;
    @TableField(exist = false)
    private List<TTag> tags;
    @TableField(exist = false)
    private TType type;

}
